package cn.cdyx.ydhl.config;

import cn.cdyx.ydhl.interceptor.YDHLInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author Watermelon
 * @Date 2023-01-30 16:09
 */
@Configuration
public class YDHLConfig implements WebMvcConfigurer {
    @Autowired
    private YDHLInterceptor ydhlInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(this.ydhlInterceptor).addPathPatterns("/ydhl/**","/hxy/**");
    }
}
